package com.nbsaas.nbmall.shop.data.entity;


import com.haoxuer.bigworld.member.data.entity.TenantUser;
import com.haoxuer.discover.data.enums.StoreState;
import com.nbsaas.codemake.annotation.FieldConvert;
import com.nbsaas.codemake.annotation.FieldName;
import com.nbsaas.codemake.annotation.FormAnnotation;
import com.nbsaas.codemake.annotation.SearchItem;
import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Data
@FormAnnotation(title = "商家收藏管理", model = "商家收藏", menu = "1,101,102")
@Entity
@Table(name = "bs_tenant_shop_collect")
public class ShopCollect extends ShopEntity{

    @SearchItem(label = "用户",name = "user",classType = "Long",operator = "eq",key = "user.id")
    @FieldConvert
    @FieldName
    @ManyToOne(fetch = FetchType.LAZY)
    private TenantUser tenantUser;

    private StoreState storeState;
}
